/*
 * Copyright 2007-2008  Lukasz Laszko lukaszlaszko@gmail.com
 * 
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for any purpose and without fee is hereby
 * granted, provided that the above copyright notice appear in all
 * copies and that both that the copyright notice and this
 * permission notice and warranty disclaimer appear in supporting
 * documentation, and that the name of the author not be used in
 * advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.
 * 
 * The author disclaim all warranties with regard to this
 * software, including all implied warranties of merchantability
 * and fitness.  In no event shall the author be liable for any
 * special, indirect or consequential damages or any damages
 * whatsoever resulting from loss of use, data or profits, whether
 * in an action of contract, negligence or other tortious action,
 * arising out of or in connection with the use or performance of
 * this software. 
 */
package org.pg.biomedics.asr.mpeg7;

/**
 * In the SpokenContentHeader description, the ConfusionInfo field actually refer to
 * a description called ConfusionCount. The ConfusionCount description contains
 * confusion statistics computed on a given evaluation collection, with a particular
 * ASR system. Given a spoken document in the collection, these statistics are
 * calculated by comparing the two following phonetic transcriptions:
 * • The reference transcription REF of the document. This results either from
 *   manual annotation or from automatic alignment of the canonical phonetic
 *   transcription of the speech signal. It is supposed to reflect exactly the phonetic
 *   pronunciation of what is spoken in the document.
 * • The recognized transcription REC of the document. This results from the
 *   decoding of the speech signal by the ASR engine. Unlike the reference transcription
 *   REF, it is corrupted by substitution, insertion and deletion errors.
 * <br />
 * <br />
 * A ConfusionCount description consists of the following elements:
 * • numOfDimensions: the dimensionality of the vectors and matrix in the ConfusionCount
 *   description. This number must correspond to the size of the
 *   PhoneLexicon to which the data applies.
 * • Insertion: a vector (of length numOfDimensions) of counts, being the number
 *   of times a phone was inserted in sequence REC, which is not in REF.
 * • Deletion: a vector (of length numOfDimensions) of counts, being the number
 *   of times a phone present in sequence REF was deleted in REC.
 * • Substitution: a square matrix (dimension numOfDimensions) of counts, reporting
 *   for each phone r in row (REF) the number of times that phone has been
 *   substituted with the phones h in column (REC). The matrix diagonal gives
 *   the number of correct decodings for each phone.
 * 
 * @author Lukasz Laszko
 */
public class ConfusionInfo 
{
    // <editor-fold desc="Fields">
    
    private int numOfDimensions;
    private int[] insertion;
    private int[] deletion;
    private int[][] substitution;    
    
    // </editor-fold>
    
    // <editor-fold desc="Properties">
    
    public int getNumOfDimensions()
    {
        return numOfDimensions;
    }

    public void setNumOfDimensions(int numOfDimensions)
    {
        this.numOfDimensions = numOfDimensions;
    }

    public int[] getInsertion()
    {
        return insertion;
    }

    public void setInsertion(int[] insertion)
    {
        this.insertion = insertion;
    }

    public int[] getDeletion()
    {
        return deletion;
    }

    public void setDeletion(int[] deletion)
    {
        this.deletion = deletion;
    }

    public int[][] getSubstitution()
    {
        return substitution;
    }

    public void setSubstitution(int[][] substitution)
    {
        this.substitution = substitution;
    }
    
    // </editor-fold>
}
